package client;

import java.io.File;
import java.io.FilenameFilter;

public class CustomFileFilter implements FilenameFilter {

	private static CustomFileFilter mSingleton;

	public static CustomFileFilter getInstance() {
		if (mSingleton == null) {
			mSingleton = new CustomFileFilter();
		}
		return mSingleton;
	}

	@Override
	public boolean accept(File dir, String name) {
		if (name != null && name.length() > 0) {
			// Don't show hidden files and folders.
			return name.charAt(0) != '.';
		}
		return false;
	}

};
